package sg.edu.nus.ouroboros.helper;

import sg.edu.nus.ouroboros.constants.AppConstants;

public class URLHelper {
	
	@Deprecated
	public static String insertAPIKey(String url){
		int index = url.indexOf("%");
		StringBuffer buf= new StringBuffer(url);
		buf.deleteCharAt(index);
		buf.insert(index, AppConstants.APIKey);
		return buf.toString();
	}
	
	public static String insertAuthToken(String url,String token){
		int index = url.indexOf("$");
		StringBuffer buf= new StringBuffer(url);
		buf.deleteCharAt(index);
		buf.insert(index, token);
		return buf.toString();
	}
	
}
